package com.dq.Week2.day06.polymorphic;

import com.dq.Week2.day06.Animal;

public class AnimalUtis {

    /**
     * 喂养动物
     * @param animal 动物对象
     */
    public static void feedAnimal(Animal animal){
        System.out.println("开始喂养动物:"+animal.getName());
        // 让动物吃东西
        animal.eat();
        System.out.println("喂养结束了：动物的hungry为"+animal.getHungry());
    }


//    public static void feedAnimal(Dog dog){
//
//    }
//
//    public static void feedAnimal(Fish fish){
//
//    }

}